//
//  User.m
//  Recipe
//
//  Created by bing han on 12-7-4.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "User.h"

@implementation User
static User *instence = nil;
@synthesize uname;
@synthesize uid;

+(User *) newInstance{
    @synchronized(self)
    {
        if (!instence)
            instence = [[User alloc] init];
        return instence;
    }
}

+(id) allocWithZone:(NSZone *)zone{
    @synchronized(self){
        if (instence == nil) {
            instence = [super allocWithZone:zone];
            return instence;
        }
    }
    return nil;
}

-(id) copyWithZone:(NSZone *)zone{
    return self;
}

-(id) retain{
    return self;
}

-(unsigned) retainCount{
    return UINT_MAX;
}

-(id) autorelease{
    return self;
}
@end
